#-*- coding: utf-8 -*-
#
def f(x):
	return x
	
def integral_fun(f,a,b,x):
	'''
	por recursividade
	'''
	N= 400.0
	dx = (b-a)/N
	if x>b:
		return 0.0
	else:
		x += dx
		return f ( x ) * dx + integral_fun ( f , a , b , x )
		
def integral_fun2(f,a,b):
	'''
	por reducao
	'''
	N = 100
	dx = (float(b)-float(a))/float(N)
	
	lista_pontos = [ a + k * dx for k in range (N) ]
	
	return reduce ( lambda x , y : x + f ( y ) * dx , lista_pontos )


print f(5)
